import request from '@/plugin/axios'
import util from '@/libs/util.js'

export function getErrorList() {
    let data = {};
    data.errorType = '-1'
    data.LogType = '-1'
    data.UserId = util.cookies.get('uuid')
    return request({
        url: '/Error/List',
        method: 'post',
        data
    })
}
export function getUserErrorList(pageno,pagesize,UserId,forminline) {
    let data = {};
    data.pageno = pageno
    data.pagesize = pagesize
    if(UserId){
        data.UserId = UserId
    }else {
        data.UserId = util.cookies.get('uuid')
    }
    if(forminline){
        data = Object.assign(forminline,data)
    }

    return request({
        url: '/Error/List',
        method: 'post',
        data
    })
}
export function getUserErrorPie(UserId,ID,ProjectNo,devType) {
    let data = {};

    if(UserId){
        data.UserId = UserId
    }else {
        data.UserId = util.cookies.get('uuid')
    }
    data.ID = ID
    data.ProjectNo = ProjectNo
    data.devType = devType
    return request({
        url: '/Error/Pies',
        method: 'post',
        data
    })
}
export function getUserProjectStatu(UserId,ID,ProjectNo,devType) {
    let data = {};
    data.ID = ID
    data.ProjectNo = ProjectNo
    data.devType = devType
    if(UserId){
        data.UserId = UserId
    }else {
        data.UserId = util.cookies.get('uuid')
    }

    return request({
        url: '/Project/Status',
        method: 'post',
        data
    })
}
